<template>
    <div>
        <!-- <router-link :to="{path:'/childOne',query:{name:'liuxiao'}}">点击id为1的</router-link> &emsp;&emsp; -->
        <!-- <router-link :to="{name:'ChildOne',params:{name:'liuxiao'}}">点击id为1的</router-link> &emsp;&emsp; -->
        <!-- <router-link :to="{name:'ChildOne',query:{name:'liuxiao'}}">点击id为1的</router-link> &emsp;&emsp; -->
        <!-- <router-link to="ChildOne">点击id为2的</router-link> -->
        <!-- <hr> -->
        <!-- <button @click="routerJump">JumpRouter</button> -->
        <router-link to="/childOne/1">点击就是1</router-link> &emsp;&emsp;
        <router-link to="/childOne/2">点击就是2</router-link>
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        methods:{
            routerJump(){
                // this.$router.push('ChildOne')
                // this.$router.push({path:'/childOne',query:{name:'liuxiao'}}).catch(err=>{err})
                this.$router.push({name:'ChildOne',params:{name:'liuxiao'}}).catch(err=>{err})
            }
        }
    }
</script>

<style scoped>

</style>